<%-- 
    Document   : stock
    Created on : 02.08.2009, 10:43:06
    Author     : Mario
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../STYLES/serverStyles.css" />
        <title>FBIS - ADMIN / LAGERVERWALTUNG</title>

    </head>
    <body>
        <jsp:useBean id="stock" scope="application" class="de.stalinski.db.PricesTableConnector" />
        <%
        int d = 1;
        if (request.getParameter("days") != null) {
            d = Integer.parseInt(request.getParameter("days"));
        }
        %>
        <div id="container">
            <div id="header">
                <jsp:include page="../HTML/header.html"/>
            </div>
            <div id="leftBar">
                <form name="frm" action="" method="GET">
                    <div class="leftMenu">
                        <table>
                            <tbody>
                                <tr>
                                    <td><a class="button" href="updateStock.jsp"><span>Lager aktualisieren</span></a></td>
                                </tr>
                                <tr>
                                    <td><a class="button" href="../menu.jsp"><span>Zurück</span></a></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id="content">
                <div class="scroll">
                    <span class="head">Aktueller Lagerbestand:</span>

                    <%
        out.print(stock.getStock(d));
                    %>
                    <form name="estimatedOrder" method="GET" action="stock.jsp">
                        <table class="Prices" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td>Empfohlene Bestellmenge für</td>
                                    <td>
                                        <select name="days">
                                            <%
        for (int i = 1; i <= 30; i++) {
            out.print("<option>" + i + "</option>");
        }
                                            %>
                                        </select>
                                    </td><td>Tage</td>
                                    <td>
                                        <input type="submit" value="Berechnen"/>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
            <div id="footer" >
                <jsp:include page="../HTML/footer.html"/>
            </div>
        </div>
    </body>
</html>
